package com.rich.common.result;

import lombok.Data;

import java.io.Serializable;

/**
 * @author guofeng
 * @version 1.0
 * @date 2021/7/14 22:17
 * 统一返回对象
 */
@Data
public class CommonResponse<T> implements Serializable {

    /**
     * 返回状态码
     */
    private Integer code;

    /**
     * 返回信息
     */
    private String message;

    /**
     * 返回数据
     */
    private T data;

    public CommonResponse() {
    }

    public CommonResponse(Integer code, String message) {
        this.code = code;
        this.message = message;
    }

    public CommonResponse(Integer code, String message, T data) {
        this.code = code;
        this.message = message;
        this.data = data;
    }


}
